

from django.contrib import admin
from django.urls import path
from yxb import index
from yxb import mysql
from yxb import get
from yxb import ajax
from yxb import search
from yxb import html
from yxb import add
from yxb.Update_file import update_file_data
from yxb.delete import d_index

urlpatterns = [
    path('', index.index_redirect),
    path('index/<str:type>/', index.index),
    path('get_file_data/', index.get_file_data),

    path('admin/', admin.site.urls),
    path('mysql/', mysql.mysql_connect_test ),
    path('name/<str:p1>', get.index ),
    path('ajax/', ajax.ajax_test ),
    path('find_by_address/', ajax.find_by_address ),

    # update
    path('update_file_data/', update_file_data ),

    # search
    path('search/<str:search_text>', search.index ),
    
    # html
    path('html/<str:html_file_name>', html.index ),

    # delete file 删除文件
    path('delete_file/<str:html_file_id>', d_index),

    # html
    path('add/', add.index ),
    path('new_html_file/', add.new_html_file ),


    # 临时测试 temp_test 
    path('temp_test/', index.get_id_and_describe ),
    
]
